home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 1 / LSD Compendium Deluxe 1.iso / a / programming / debuggers / scypmon.lha / scypmonv1.8 / Scypmon.doc < prev    next >
Encoding:
Text File  |  1994-01-13  |  22.2 KB  |  567 lines

  1.  
  2.             Description for Scypmon V1.8
  3.             \==========================/
  4.  
  5. Release:
  6. --------
  7.  
  8. (C) by Jörg Bublath 1989-1994
  9.  
  10.   Developing this program took me a long time, so I'd appreciate a little
  11. financial support. Because I hate all those "crippled unregistered versions",
  12. I won't do this myself to get my DM 5,- (or US $5) shareware fee (that
  13. really isn't much, is it ?), but I appeal to all those users out there to be
  14. honest ! I know it costs a big pile of money to pay or all those shareware-
  15. programs that one has. So I would like to suggest a new shareware concept:
  16. I call it "you share me - I share you", which means that all authors of
  17. shareware-programs let me use their programs for free, and they mine, but all
  18. those who don't write any useful programs can begin doing so - or pay!
  19. Update-services, which would cost money of course, aren't included in
  20. the "share each other" concept. All those guys who helped me with ideas,
  21. test-reports and routines to make Scypmon better, don't have to pay
  22. shareware either (but I don't mind when they do :-))
  23. Of course all authors of good Non-Shareware Software are included in my offer,
  24. too! Just send me notice and your program.
  25.  
  26.   I prohibit changes to the program (incl. source) and documentation.
  27.  
  28.   Scypmon is free to be spread on public-domain and shareware disks
  29. especially on Fred Fish's AmigaLibDisks, as long as they are sold for a
  30. reasonable charge that is less than US $6 or DM 8.- .
  31. For use in commercial products the permission of the author is required.
  32. Scypmon may be copied and distributed via electronic networks such
  33. as the Internet, also it may be moved on anonymous ftp-servers,
  34. mail-boxes or BBS's.
  35. The Copyright stays by the Author.
  36. Scypmon is Shareware, that means you may keep Scypmon in archived form
  37. without paying, but when you unpack it and use it, you have to pay the fee
  38. mentioned above, or share your programs with me.
  39.  
  40. General Information:
  41.  
  42.   This monitor uses a full-screen-editor with or without automatic
  43. insertion and an additional command-history of 1K. The cursor can be
  44. moved using the cursor-keys or by positioning it with your mouse.
  45. If you leave the screen up or down, the screen will be scrolled in the
  46. opposite direction. If the status-line is inverted, then the monitor is
  47. active. The headline also shows if you are in insert or overwrite mode.
  48. When you use the scrolling and there is an output-line of the "m", "i"
  49. or "d"-command on the screen the next logical line of this command will
  50. appear instead of the empty line.
  51.  
  52.   Using the cursor-keys with shift will cause scrolling by one full screen.
  53.  
  54. Some other keys that are used in a special way:
  55.  
  56.   HELP (=CTRL-l)          : Clear Screen + Cursor Home
  57.   Shift + HELP (CTRL-K)   : Clears the rest of the line starting at the
  58.                 actual cursor-position.
  59.   Shift + DEL          : Inserts one blank
  60.   On the numeric keypad:
  61.   Shift + 7          : Cursor home (upper left corner)
  62.   Shift + 1          : Cursor end (lower left corner)
  63.   Shift + 0          : Switch between insert and overwrite mode
  64.   Shift + .          : Del
  65.   F1              : Jsr-dissassemble in
  66.   Shift + F1          : Switch mode "m" and "d" in full-screen display
  67.   F2              : Jsr-dissassemble out (explained later)
  68.   Alt + Cursor Up      : Previous command-history entry
  69.   Alt + Cursor Down      : Following command-history entry
  70.  
  71. During screen-output:
  72.  
  73.   SPACE           : Stop screen-output, continue: SPACE again
  74.   CTRL-C          : Break screen-output
  75.   Left mouse-button      : Hold to stop screen-output
  76.  
  77. Exceptions:
  78. -----------
  79.  
  80.   All exceptions except #08 (privelege violation) and the trap #0x - commands
  81. will not cause a guru, but instead a monitor output stating "exception #xx at
  82. xxxxxx" if the "-p"-option to patch the exceptions is activated. In addition
  83. you will receive some detailed information about the task that crashed (see
  84. "e"-command) and it should no longer be in the task-list. If you crash your
  85. machine totaly there will be certainly only one help for you :
  86. ctrl + amiga + amiga !
  87.  
  88. Calling the monitor from CLI:
  89. -----------------------------
  90.  
  91. You can call the monitor by typing:
  92.  
  93. scypmon [-bdp] [-P <xpos> <ypos>] [-S <xsize> <ysize>]
  94.     [-s <pubscreen>] [-f <fontname> <fontsize>] [batchfile]
  95.  
  96. "-b" will make the monitor start itself in background, which means that its
  97.      window will not be activated at startup.
  98.  
  99. "-p" will patch the exception vectors to catch gurus. If this option is
  100.      not used, Amiga-Dos will do what ever it likes with crashes.
  101.  
  102. "-d" Tries to use the dis.library to disassemble, which means that Scypmon
  103.      will know 68030-commands. Assembling is still only possible for
  104.      68000, and even this will sometimes cause trouble with the dis.library
  105.      because of a slightly different syntax.
  106.  
  107. "-P" give new coordinates for the window to open.
  108.  
  109. "-S" give a new size for the window.
  110.  
  111.      CAUTION: If the window cannot open due to wrong coordinates, Scypmon
  112.           won't run. There will be no error-message!
  113.  
  114. "-s" Running 2.0+ you are able to have public-screen. This option makes it
  115.      possible to open the scypmon on any public screen.
  116.  
  117. "-f" For use of other than the fonts (systemfont) defined with preferences.
  118.  
  119.   This batchfile may be any textfile eg. edited with "ed" that contains a
  120. list of monitor commands. This option is very useful for absolute
  121. programming, when you need to load graphic or sound data into memory.
  122.  
  123. eg.:
  124. {
  125. o 60000 7f000 00
  126. l "graphic.data" 70000
  127. l "sound.data" 60000
  128. l "sinus-table" 7e000
  129. x
  130. }
  131.  
  132. This batchfile will clear the memory from 60000 to 7f000, load the three
  133. programs absolutely into memory and leaves the monitor afterwards.
  134.  
  135. A clarification to the memory allocations:
  136.  
  137.   To prevent allocmem-chaos, the monitor organizes memory-allocations in
  138. its own way. You have 8 segments (0-7) that can be used for allocations.
  139. If you use one segment twice then the old memory allocated in this
  140. segment will be freed. When you leave the Monitor all segments will be
  141. given back to Amiga-Dos. This prevents a chaos like in c-mon when you
  142. load several programs and don't know afterwards where and how much, so
  143. you have to reset to have a clean memory again.
  144.  
  145. Menus
  146. ------
  147.  
  148.   The options "-p" and "-d" can also be changed while the monitor is
  149. running by using the menus. You also can leave scypmon by menues or
  150. call up a helpwindow.
  151. The help-window is just a short overview over the command and no
  152. replacement for the doc-file.
  153.  
  154. The commands (in alphabetical order):
  155. --------------------------------------
  156.  
  157. All Values (in assemble/dissamble,too !) have to be entered hexadecimal (you
  158. don't have to use $xxx - only xxx) !
  159.  
  160. [ ]    : Expressions in these brackets are optional
  161. ( )    : Expressions in round brackets have to be entered
  162. start  : Is a hex-expression that indicates a start-adress
  163. stop   : Is a hex-expression that indicates an end-adress
  164. target : Is a hex-expression that indicates a target-adress
  165. name   : Is an ASCII-string
  166. segment: A memory segment between 0 and 7
  167.  
  168. When dealing with hex-adresses you can use the variables ^(a-z) in most
  169. cases.
  170. ----------------------------------------------------------------------------
  171. [?] (expression)                        : Calculate
  172.  
  173.   The expression will be calculated and printed out decimal, hexadecimal,
  174. binary and as 4-char ASCII string. Inside the expression you have to use a
  175. "$" to indicate a hex-number, a "#" or nothing to indicate a decimal number,
  176. a "%" to indicate a binary-number and max. 4 ASCII chars "<str>" or '<str>'.
  177. In addition, you can get the value of a hex-address with "&(hexaddress)",
  178. use uservariables with "^(a-z)" and the following systemvariables:
  179. ^s    = Startadress of last load
  180. ^e    = Endadress of last load
  181. ^S0-7 = Startadress of segment 0-7
  182. ^L0-7 = Length of segment 0-7
  183.  
  184.   For calculation you may use "+", "-", "*" and "/". You can also use
  185. brackets - The calculation will be done in mathematical order (first "*"
  186. and "/" then "+" and "-")
  187.  
  188. eg.: ? $1000-(#100+%010)*2
  189. ----------------------------------------------------------------------------
  190. ^(a-z)=(expression)                     : set variable
  191.  
  192.   This sets one of the 26 user-variables to the given value (compare "?")
  193. Caution: The variables ^s and ^e are used by the monitor to indicate
  194. the last start- and end-address of absolute loading.
  195.  
  196.  
  197. eg.: ^a=^a+$20-(1+4)*5
  198. ----------------------------------------------------------------------------
  199. <b (blocknr) (start) [len] [!]          : Block Load
  200. >b (blocknr) (start) [len]              : Block Save
  201.  
  202.   Loads/Saves (len) bytes from disk starting with block number (blocknr).
  203. If you don't give a [len] , $200 bytes = 1 sector will be loaded/saved.
  204. As device will be used the one fixed the with "V"-command.
  205. Attention: You have to enter all values in hex !
  206. The "!"-Option overrides the memory check, to overload memory already
  207. allocated by DOS.
  208.  
  209. eg.: <b 1a2 70000
  210. ----------------------------------------------------------------------------
  211. <o (offset) (start) [len] [!]           : Offset Load
  212. >o (offset) (start) [len]               : Offset Save
  213.  
  214.   Loads/Saves (len) bytes from disk starting with offset (offset).
  215. If you don't give a [len] , $200 bytes = 1 sector will be loaded/saved.
  216. As device will be used the one fixed the with "V"-command.
  217. Attention: You have to enter all values in hex !
  218. The "!"-Option overrides the memory check, to overload memory already
  219. allocated by DOS.
  220.  
  221. eg.: <o 30000 70000
  222. ----------------------------------------------------------------------------
  223. <t (tr) (hd) (sc) (start) [len] [!]     :Track Load
  224. >t (tr) (hd) (sc) (start) [len]         :Track Save
  225.  
  226.   Loads/Saves [len] bytes from disk starting at track, head, sector. If you
  227. don't give a [len] the default of $1400 bytes = 1 side of a track will
  228. be loaded/saved.
  229. As device will be used the one fixed the with "V"-command.
  230. Attention: You have to enter all values in hex !
  231. The "!"-Option overrides the memory check, to overload memory already
  232. allocated by DOS.
  233.  
  234.  
  235. eg.: <t 0a 01 06 70000
  236. ----------------------------------------------------------------------------
  237. a (start)                               : Assemble
  238.  
  239.   Will cause an output of a "," followed by the given adress and sets the
  240. cursors to the right tab-position to assemble. Instead of using this
  241. command you can simply dissassemble the adress and overwrite it.
  242.  
  243. eg.: a 70000
  244. ----------------------------------------------------------------------------
  245. A (segment) (start) (len)               : Allocate Absolute
  246.  
  247.   Uses AllocAbs (-204) to allocate memory and remembers the memory in the
  248. segment-list.
  249.  
  250. eg.: A 0 70000 1000
  251. ----------------------------------------------------------------------------
  252. A (segment) (len)                       : Allocate Memory
  253.  
  254.   If you don't give a alloc-adress allocmem (-198) will be used and the
  255. memory remembered in the segment-list.
  256.  
  257. eg.: A 0 1000
  258. ----------------------------------------------------------------------------
  259. b (start)                               : Boot Checksumm
  260.  
  261.   Calculates the checksum of a bootblock ($0400 bytes !) and inserts it.
  262.  
  263. eg.: b 70000
  264. ----------------------------------------------------------------------------
  265. B (stop)                                : Breakpoint
  266.  
  267.   A breakpoint will be set to the adress (stop), then the program will start
  268. according to the entered PC at the "r"-command. After execution the
  269. breakpoint will be cleared and the register will be given out.
  270.  
  271. eg.: B 70200
  272. ----------------------------------------------------------------------------
  273. c (start) (stop) (target)               : Compare
  274.  
  275. T  he memory (start) to (stop) will be compared with the (target) and all
  276. differing bytes will be reported.
  277.  
  278. eg.: c 70000 71000 72000
  279. ----------------------------------------------------------------------------
  280. C (start)                               : Calc Block CheckSumm
  281.  
  282.   Calculates the checksum of a normal diskblock and inserts it.
  283.  
  284. eg.: C 70000
  285. ----------------------------------------------------------------------------
  286. CD [name]                : Change Directory
  287.  
  288.   The actual Path will be set to [name].
  289.  
  290. eg.: CD df0:c
  291. ----------------------------------------------------------------------------
  292. d (start) [stop]                        : Dissassemble
  293.  
  294.   The given memory will be disassembled. Before each output-line there will
  295. be printed a "," as a marker for the scroll-function and for assembling (so
  296. you can assemble when overwriting).
  297.  
  298. eg.: d 70000 70020
  299. ----------------------------------------------------------------------------
  300. D [name]                : Directory
  301.  
  302.   If no name is given, the actual directory will be printed out, otherwise
  303. the given path will be used.
  304.  
  305. eg.: D df0:c
  306. ----------------------------------------------------------------------------
  307. e "(taskname)"                          : Examine Task
  308. e (taskadress)
  309.  
  310.   The given task is searched and will be printed with name, adress, priority,
  311. signals and stackusage (and CLI-command).
  312.  
  313. e.g.: e "Scypmon 1.4"
  314. ---------------------------------------------------------------------------
  315. f (start) (stop) (v1) [v2...] [!]       : Find
  316.  
  317.   This command searches after a expression that can be defined as a mixture
  318. out of hexnibbles, "*", or strings. When nibbles are replaced by the
  319. joker "*" then the command will find any possible matches.  If the "!" is
  320. added then it will be a not-find, that means if you search for "00 !" you
  321. will find all places where no 00 exists.
  322.  
  323. eg.: f 70000 80000 01 "hello" 0* 4a3b "xx" 00
  324. ----------------------------------------------------------------------------
  325. fd (start) (stop) (v1) [v2...] [!]      : Find and disassemble
  326.  
  327.   Like the normal find-command, but if something is found it will be dis-
  328. assembled if it stands on an even adress - then the monitor waits for any
  329. key. If you press 'ESC' you will exit find-mode, otherwise the search will
  330. be continued and if found the next line will be disassembled. If you are
  331. only interested in the arguments of a command, the necessary number of
  332. jokers ('*') has to be put in front if you want a sensible output.
  333.  
  334. eg.: fd 70000 80000 **** 00dff180
  335. ----------------------------------------------------------------------------
  336. fr (start) (stop) (target)              : Find Relative
  337.  
  338.   Searches for a word between (start) and (stop) that points relatively to
  339. (target). This word can lie between (target)-$8000 to (target)+$8000.
  340. Very useful to find branches and xxxx(pc)-adressmodes. Won't find
  341. short-branches.
  342.  
  343. eg.: fr 70000 72000 71000
  344. ----------------------------------------------------------------------------
  345. F (segment)                             : Free Memory
  346.  
  347.   The given segment will be freed by using freemem (-210) or UnLoadSeg.
  348.  
  349. eg.: F 0
  350. ----------------------------------------------------------------------------
  351. g (ziel)                                : Goto
  352.  
  353.   The program will be started at the given address under use of the at "r"
  354. defined stacks and registers and return after "rts" into the monitor.
  355.  
  356. eg.: g 70000
  357. ----------------------------------------------------------------------------
  358. h                    : Show history
  359.  
  360.   The command-history will be displayed on the screen.
  361.  
  362. e.g.: h
  363. ----------------------------------------------------------------------------
  364. i (start) [stop]                        : ASCII Dump
  365.  
  366.   The given memory will be printed as ASCII-dump. As a marker for scrolling
  367. a ";" is used.
  368.  
  369. eg.: i 70000 70020
  370. ----------------------------------------------------------------------------
  371. l ["](name)["] (start) [!]              : Load absolute File
  372.  
  373.   The given file is loaded at the given adress. Using the "M"-command the
  374. monitor looks up how many bytes of memory are free, and loads only that
  375. many bytes. If you want to overload memory allocated by DOS you can
  376. cancel this control with "!".
  377. The start- and end-address will be saved into the variables ^s and ^e for
  378. further use, especially in batchfiles.
  379.  
  380. eg.: l "program.obj" 70000
  381. ----------------------------------------------------------------------------
  382. ld ["](name)["] (segment)               : Load Dos-File
  383.  
  384.   Load an Amiga-Dos file using the LoadSeg-Command, allocs the memory and
  385. inserts it into the segment-list.
  386.  
  387. eg.: ld "dir" 0
  388. ----------------------------------------------------------------------------
  389. m (start) [stop]                        : Memory Dump
  390.  
  391.   The given memory will be printed as a hex-dump. Each line will be marked
  392. by a ":" for scrolling and overwriting.
  393.  
  394. eg.: m 70000 70020
  395. ----------------------------------------------------------------------------
  396. M (start)                               : Show Free Memory
  397.  
  398.   Looks up how many bytes of free memory there are, starting at the given
  399. address, and print the amount.
  400.  
  401. e.g.: M 30000
  402. ----------------------------------------------------------------------------
  403. o (start) (stop) (v1) [v2...]           : Occupy
  404.  
  405.   The memory between (start) and (stop) will be filled with the given values.
  406.  
  407. eg.: o 70000 71000 01 23 45
  408. ----------------------------------------------------------------------------
  409. O [name]                : Set Output Device
  410.  
  411.   Here you can enter the device/filename that is used with the "p"-command.
  412. If you don't give a name you will see the actual device.
  413. (Default: prt:)
  414. The outputfile will be opened at the first use of the "p"-command and
  415. closed when you leave the monitor or specify a new output-file.
  416.  
  417. e.g.: O df0:testfile
  418. ----------------------------------------------------------------------------
  419. p (any command)                         : Print using Output Device
  420.  
  421.   You can add a "p" as prefix before every command to have an output on
  422. screen and chosen output-device (eg.: printer).
  423.  
  424. eg.: pd 70000 70200
  425. ----------------------------------------------------------------------------
  426. P (start)                               : Print Text
  427.  
  428.   Prints a text in memory on the screen. The text should be ended by a $00.
  429. The output can be paused by space and stopped by CTRL.
  430.  
  431. eg.: P 70000
  432. ----------------------------------------------------------------------------
  433. r                    : Register
  434.  
  435.   Give you all processor-registers (used at "goto" or "trace"). You can
  436. change them by overwriting.
  437.  
  438. eg.: r
  439. ----------------------------------------------------------------------------
  440. s ["](name)["] (start) (stop)           : Save absolute File
  441.  
  442.   The given memory will be saved.
  443.  
  444. eg.: s "objectcode" 70000 72000
  445. ----------------------------------------------------------------------------
  446. S [segment]                : Segment List
  447.  
  448.   Print the data of the given segment - if it is an Amiga-Dos File you will
  449. get a list of all segments of this file.
  450. If no segment is given, you will get a general list of all 8 segments.
  451.  
  452. eg.: S 0
  453. ----------------------------------------------------------------------------
  454. t (start) (stop) (target)               : Tansfer
  455.  
  456.   The memory from (start) to (stop) will be transfered to (target).
  457.  
  458. eg.: t 70000 71000 71000
  459. ----------------------------------------------------------------------------
  460. T [start]                : Trace
  461.  
  462.   Starting at [start] (or if not given at the defined PC) the monitor will
  463. dissassemble one command. You can start tracing now, using the following
  464. keys:
  465.     return: execute this command and show next
  466.     x:    leave the trace-mode
  467.     r:    show registers
  468.     n:    set a breakpoint on the next command and start program.
  469.         useful to escape from "dbf"-loops.
  470.     j:    the next command will be executed, then one longword will
  471.         be taken from the stack and a breakpoint will be set to
  472.         the adress that is defined by the longword.
  473.         Effect: if the actual command is a jsr/bsr the whole
  474.         subroutine will be executed before returning to trace-
  475.         mode. Otherwise the program will come back to trace-
  476.         mode at the next "rts". Be careful: if something is
  477.         taken from the stack before "rts" you will have a
  478.         nice crash !
  479.     g:    will behave like goto (leave trace-mode)
  480.  
  481. eg.:    T 70000
  482. ----------------------------------------------------------------------------
  483. V <devicename>                : Device
  484.  
  485.   Changes the device used with the track-commands (default: df0).
  486.  
  487. eg.: V df0
  488. ----------------------------------------------------------------------------
  489. w (start) ["](name)["]                  : Write ASCII
  490.  
  491.   The given string will be written as ASCII-code into memory.
  492.  
  493. eg.: w 70000 "hello world"
  494. ----------------------------------------------------------------------------
  495. x                    : Exit
  496.  
  497.   Leaves Scpymon. Allocated Memory will be restored.
  498.  
  499. eg.: x
  500. ----------------------------------------------------------------------------
  501.  
  502. Jsr-Disassemble
  503. ----------------
  504.  
  505.   This option is useful to trace a program by brain. When the F1-Key is
  506. pressed the assembly-expression in the actual cursor-line will be
  507. calculated (source-part) and the actual dissassemble-adress will be
  508. pushed on a roundstack for 16 values. Afterwards, if the actual
  509. command was a jsr/jmp or branch-command, the memory at the calculated
  510. adress will be disassembled, otherwise it will be printed using the
  511. "m"-command. The jsr-disassembler knows the following expressions:
  512. $xxxx,$xxxx(pc),$xx(ax),$xx(ax,dx),$xx(ax,ax). As registers the actual
  513. defined one will be taken.
  514.   If the actual cursorposition is on a "m"-line, the next 8 digits will
  515. be taken as long adress and shown by "m"-command again.
  516. If you are on any other line, the hexadress at cursorposition will be
  517. scanned and shown by "m" (Attention: You can't use F2 to go back here!)
  518.   If you have seen enough about your subroutine/data you can press f2 to get
  519. back to your starting point.
  520.   The data will be saved on a round-stack, which means that you can
  521. press F1 as often as you want and don't have to worry about a stack overflow,
  522. but you can only take the last 16 "f1"s back with f2.
  523. If you are not happy about the mode the monitor chose while pressing
  524. f1 ("m" or "d"), you can change this by pressing shift+F1.
  525.  
  526. News for V1.6:
  527.   Window! Sizable! Fonts! Public-Screen! More compatible! Better
  528.   Trackloading....
  529.  
  530. News for V1.7:
  531.   Minor Bugfixes, Trackdisk now works REALLY on all devices, Enforcerhits
  532.   removed, removed german docs.
  533.  
  534. News for V1.8:
  535.   Really minor bugs (especially on 68000 machines) removed.
  536.  
  537. Known Bugs:
  538. -----------
  539. Under V1.3 Scypmon seems to complain about fontwidth - just ignore or use 2.0 :)
  540.  
  541. Credits:
  542. --------
  543.  
  544. Thanx to all my friends on the internet who helped testing.
  545.      MrScary for reformatting the docs.
  546.      Tobias "Top" Walter for the dis.libary. (Hey - I support your V2 for
  547.      over a year now, but when will you develop it? :)
  548.  
  549. Final Remarks
  550. -------------
  551.  
  552.   The fact that I didn't recover bugs when testing, doesn't mean that there
  553. are no bugs at all, so if you have new ideas or find bugs, feel free to send
  554. your them to my address, including a disk and the return-postage for sending
  555. you a new version.
  556.  
  557. Jörg Bublath
  558. Holzheimerstr. 4, E07
  559. W-8390 Passau
  560. Germany
  561.  
  562. or reach me by email under:
  563. bublath@forwiss.uni-passau.de
  564.  
  565. or find me on IRC on #amigager under the nickname 'Skull'
  566.  
  567.